""" 
    Bookshelf - twExtJs demo with Pylons.
    
    Distributed under the terms of Lesser GNU Public License.
    
    (c) 2007 - Ricardo Girardi Sixel 
"""

import sys, os

try:
    from setuptools import setup, find_packages
except ImportError:
    from ez_setup import use_setuptools
    use_setuptools()
    from setuptools import setup, find_packages
    
if sys.version_info < (2, 4):
    raise SystemExit("Python 2.4 or later is required ATM")

execfile("release.py")

PACKAGES = [
    'bookshelf'
    ]

def get_description():
    # Adapted from PEAK-Rules' setup.py
    # Get our long description from the documentation
    f = file('docs/index.txt')
    lines = []
    for line in f:
        if not line.strip():
            break     # skip to first blank line
    for line in f:
        if line.startswith('Main differences'):
            break     # read to "Main differences..."
        lines.append(line)
    f.close()
    return ''.join(lines)

setup(
    name=__PACKAGE_NAME__,
    version=__VERSION__,
    description=__DESCRIPTION__,
    long_description = get_description(),
    install_requires=[
        'twExtJS',
        'pylons',
        'Myghty >= 1.1',
        'SQLAlchemy',
        'pysqlite'
        ],
    url = "http://twextjs.googlecode.com/",
    download_url = "http://twextjs.googlecode.com/files/bookshelf-0.0.1dev_r41-py2.4.egg",
    dependency_links=[
        'http://twextjs.googlecode.com/download/',
        ],
    author=__AUTHOR__,
    author_email=__EMAIL__,
    license=__LICENSE__,
    test_suite = 'tests',
    packages = PACKAGES,
#    namespace_packages = ['bookshelf'],
    data_files=[('', ['development.ini','books.db'])],

    include_package_data=True,
    exclude_package_data={"thirdparty" : ["*"]},
    entry_points="""
    [paste.app_factory]
    main = bookshelf.config.middleware:make_app

    [paste.app_install]
    main = pylons.util:PylonsInstaller
    """,
    zip_safe=False,
    classifiers = [
        'Development Status :: 3 - Alpha',
        'Environment :: Web Environment',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)',
        'Operating System :: OS Independent',
        'Programming Language :: Python',
        'Topic :: Software Development :: Libraries :: Python Modules'],
)

